package com.alibaba.nacos.config.server.jpa.repository;

import java.util.Optional;

import com.alibaba.nacos.config.server.jpa.entity.UsersEntity;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.stereotype.Repository;

/**
 * @author
 * @date 2020-03-08 23:31
 */
@Repository
public interface UsersRepository extends BaseRepository<UsersEntity, Long> {

    @Modifying
    void deleteByUsername(String usernmae);


    UsersEntity findByUsername(String username);

    Optional<UsersEntity> getByUsername(String username);
}
